package com.letoken.platform.repo.sss.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@ApiModel(value = "登陆请求信息", description = "登陆请求信息")
public class LoginReq implements Serializable {

    @ApiModelProperty(name = "user", value = "账号", required = true, example = "a123456")
    @NotBlank(message = "账号不能为空")
    @Size(min = 6, max = 15, message = "账号长度必须在6到15个字符之间")
    @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d).+$", message = "账号必须包含字母和数字")
    private String user;


    @ApiModelProperty(name = "password", value = "密码", required = true, example = "a123456")
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 15, message = "密码长度必须在6到15个字符之间")
    @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d).+$", message = "账号必须包含字母和数字")
    private String password;

}